package router

import "google.golang.org/protobuf/proto"

var routerMap = map[uint32]func(req proto.Message, rsp proto.Message){}

func RegisterAll(handlers map[uint32]func(req proto.Message, rsp proto.Message)) {
	for k, v := range handlers {
		routerMap[k] = v
	}
}

func GetHandler(h uint32) func(proto.Message, proto.Message) {
	return routerMap[h]
}
